#! /usr/bin/env python3
# description: 发送邮件

import yagmail
import keyring

pwd = keyring.get_password('yagmail', 'gomx1028@126.com')
yag = yagmail.SMTP(user='gomx1028@126.com', password=pwd, host='smtp.126.com')
content = ['长风破浪会有时，', '直挂云帆济沧海。', '草木有本心，', '何求美人折？', '昔时人已没，', '今日水犹寒。']
subject = '古诗集锦'
yag.send('1728148325@qq.com', subject, content, '小岛.jpg')
yag.close()
print("done")

